package com.nageoffer.shortlink.project.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.nageoffer.shortlink.project.pojo.dto.Req.ShortLinkCreateReqDTO;
import com.nageoffer.shortlink.project.pojo.dto.Req.ShortLinkPageReqDTO;
import com.nageoffer.shortlink.project.pojo.dto.Req.ShortLinkUpdateReqDTO;
import com.nageoffer.shortlink.project.pojo.dto.Resp.ShortLinkCreateRespDTO;
import com.nageoffer.shortlink.project.pojo.dto.Resp.ShortLinkGroupCountRespDTO;
import com.nageoffer.shortlink.project.pojo.dto.Resp.ShortLinkPageRespDTO;
import com.nageoffer.shortlink.project.pojo.entity.ShortLink;
import jakarta.servlet.ServletRequest;
import jakarta.servlet.ServletResponse;

import java.io.IOException;
import java.util.List;

public interface ShortLinkService extends IService<ShortLink> {
    ShortLinkCreateRespDTO createShortLink(ShortLinkCreateReqDTO requestParam);

    IPage<ShortLinkPageRespDTO> pageShortLink(ShortLinkPageReqDTO requestParam);

    List<ShortLinkGroupCountRespDTO> listGroupShortLinkCount(List<String> gidList);

    void updateShortLink(ShortLinkUpdateReqDTO requestParam);

    void restoreUrl(String shortUri, ServletRequest request, ServletResponse response) throws IOException;
}
